<IfModule mod_rewrite.c>

RewriteEngine on
RewriteBase /
RewriteRule ^not_found?$ index.php?m=not_found [L]
RewriteRule ^search?$ index.php?m=search [L]
RewriteRule ^/?$ index.php?m=home [L]

RewriteRule ^account/password?$ index.php?m=change_password [L]
RewriteRule ^account/password/?$ index.php?m=change_password [L]
RewriteRule ^account/profile?$ index.php?m=profile [L]
RewriteRule ^account/profile/?$ index.php?m=profile [L]
RewriteRule ^account/login?$ index.php?m=login [L]
RewriteRule ^account/login/?$ index.php?m=login [L]
RewriteRule ^account/register?$ index.php?m=register [L]
RewriteRule ^account/register/?$ index.php?m=register [L]
RewriteRule ^account/purchases?$ index.php?m=purchases [L]
RewriteRule ^account/purchases/?$ index.php?m=purchases [L]
RewriteRule ^account/offers?$ index.php?m=offers [L]
RewriteRule ^account/offers/?$ index.php?m=offers [L]

RewriteRule ^admin/settings?$ index.php?m=settings [L]
RewriteRule ^admin/settings/?$ index.php?m=settings [L]
RewriteRule ^admin/options?$ index.php?m=options [L]
RewriteRule ^admin/options/?$ index.php?m=options [L]
RewriteRule ^admin/payments?$ index.php?m=payments [L]
RewriteRule ^admin/payments/?$ index.php?m=payments [L]

RewriteRule ^products/?$ index.php?m=my_products [L]
RewriteRule ^products?$ index.php?m=my_products [L]

RewriteRule ^edit/(.*)?$ index.php?m=edit&custom_url=$1 [L]

RewriteRule ^cancelled/?$ index.php?m=cancel [L]
RewriteRule ^cancelled?$ index.php?m=cancel [L]

RewriteRule ^download/(.*)?$ index.php?m=download&custom_url=$1 [L]

RewriteRule ^payment/(.*)?$ index.php?m=check_payment&method=paypal [L]

RewriteRule ^delete/(.*)?$ index.php?m=delete&custom_url=$1 [L]
RewriteRule ^confirm_delete/(.*)?$ index.php?m=delete&custom_url=$1&confirmed=yes [L]

RewriteRule ^upload?$ index.php?m=add_new [L]
RewriteRule ^upload/?$ index.php?m=add_new [L]

RewriteRule ^dashboard?$ index.php?m=dashboard [L]
RewriteRule ^dashboard/?$ index.php?m=dashboard [L]

RewriteRule ^logout?$ index.php?m=logout [L]

RewriteRule ^p/(.*)?$ index.php?m=item&custom_url=$1 [L]
RewriteRule ^i/(.*)?$ index.php?m=item&id=$1 [L]

RewriteRule ^item/(.*)?$ index.php?m=item&custom_url=$1 [L]

RewriteRule ^install?$ install.php [L]

</IfModule>
<Files 403.shtml>
order allow,deny
allow from all
</Files>

